﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Zxgl_Login.aspx.cs" Inherits="Zxgl_Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会员登录</title>
    <link type="text/css" href="css/other.css" rel="stylesheet" />
    <script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    function form_login_submit() {
        if (jQuery('#username1').val().length < 2) {
            alert("请输入正确用户名!");
            return;
        } else if (jQuery('#userpass1').val().length < 5) {
            alert("请输入正确密码!");
            return;
        } else {
          
            var rs = jQuery('#username1').val();
            var rpass = jQuery('#userpass1').val();
            jQuery.ajax({
                url: "Ajax/MemberLogin.ashx",
                data: { t: 'login_t', us: rs, up: rpass },
                type: "POST",
                success: function (data) {
                    if (data + '' == 'True' || data + '' == 'true') {
                        $(parent.document.getElementById("userNameInfo")).html("当前用户为:" + rs);
                        $(parent.document.getElementById("LoginStatus")).html("退出");
                            alert("登录成功!");
                       
                        top.$.jBox.close(true);
                        //window.parent.location.replace(window.parent.location.href);
                        return;
                    } else {
                        alert('密码错误!');
                        return;
                    }
                }
            });

        }
    } 
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
          <br />
            <ul class="login_ul">
                <li>
                    <p class="name"> 用户名</p>
              <input type="text" class="login"   name="username1" id="username1"   placeholder="您的用户名/手机号/邮箱" /> 
                </li>
                <li>
                    <p class="name"> 密码</p> 
              <input name="userpass1" id="userpass1" type="password" class="login"   placeholder="您的密码" onkeydown="if(event.keyCode == 32)return false"/> 
                </li>
                <li>
                <input type="button" class="login_btn" value="登 录"  onclick="javascript:form_login_submit();"/> 
                 <%--   <a href="reg.aspx" class="login_reg">注册新账号</a>--%>

                </li>
            </ul>
        </div>
    </div>
    </form>
</body>
</html>
